reorganized files and implemented VADER and BilSTM, both of which need more work#1
Open
reorganized files and implemented VADER and BilSTM, both of which need more work#1
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR reorganizes the project structure and adds implementations for VADER and a BiLSTM sentiment analysis model, along with updates to the BERT components for climate analysis.
- Added a new VADER-based sentiment analysis module.
- Introduced BiLSTM modules including dataset, training, evaluation, and model definition with GloVe embedding integration.
- Updated BERT model import paths to reflect the new repository structure.
Reviewed Changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| models/VADER/vader.py | Introduced a new VADER sentiment analysis implementation. |
| models/BilSTM/utils.py | Added utility function for loading GloVe embeddings. |
| models/BilSTM/train.py | Added training loop for BiLSTM, but with an argument mismatch issue. |
| models/BilSTM/model.py | Defined the BiLSTM model using frozen pre-trained embeddings. |
| models/BilSTM/main.py | Integrated data loading, training, and evaluation for BiLSTM. |
| models/BilSTM/evaluate.py | Provided model evaluation, confusion matrix plotting, and metrics. |
| models/BilSTM/dataset.py | Defined a custom dataset for tweet sentiment data. |
| models/BERT/* | Updated import paths and maintained utility functions for BERT. |
|
|
||
| # Train loop | ||
| for epoch in range(NUM_EPOCHS): | ||
| loss = train_model(model, train_loader, optimizer, criterion, device) |
There was a problem hiding this comment.
The call to train_model passes a 'criterion' argument, but the definition in models/BilSTM/train.py does not accept it. Update the train_model function to accept the criterion parameter or remove the extra argument from the call to ensure consistent API usage.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.